﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Tiger t = new Tiger();
            t.Let = 4;
            t.Eat();
            t.Sleep();
            t.Nigthlook();
            t.Cry();
            Console.WriteLine("--------------------------------");
            Cat c = new Cat();
            c.Let = 4;
            c.Eat();
            c.Sleep();
            c.Nigthlook();
            c.Cry();
            Console.WriteLine("--------------------------------");
            swallow s = new swallow();
            s.Let = 2;
            s.Eat();
            s.Sleep();
            s.Fly();
            s.Cry();
            Console.WriteLine("--------------------------------");
            Eagle e = new Eagle();
            e.Let = 2;
            e.Eat();
            e.Sleep();
            e.Fly();
            e.Cry();
        }

    }
    class Animal
    {
        protected int let;
        public int Let
        {
            get { return this.let; }
            set { this.let = value; }
        }
        public void Eat()
        {
            Console.WriteLine("能吃");
        }
        public void Sleep()
        {
            Console.WriteLine("能睡觉");
        }
        public virtual void Cry()
        {
            Console.WriteLine("会叫");
        }

    }
    class CatType:Animal
    {
       
        public void Nigthlook()
        {
            Console.WriteLine( "能夜视");
        }
    }
    class BirdsType:Animal
    {
        public void Fly()
        {
            Console.WriteLine("会飞");
        }
    }
    class Cat: CatType
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("喵喵喵");
        }
    }
    class Tiger : CatType
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("嗷嗷嗷");
        }
    }
    class swallow: BirdsType
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("叽叽叽叽");
        }
    }
    class Eagle: BirdsType
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("将将将");
        }
    }
}
